home *** CD-ROM | disk | FTP | other *** search
/ Shareworld 4 / Shareworld 4 (Disk 2 of 2).adf / ASCIItoKW3.v1.00 / ASCIItoKW3.v1.00.asc next >
Text File  |  1995-04-27  |  15KB  |  611 lines

  1. ; ASCIItoKW3 v1.00
  2. ; Public Domain
  3. ; 95.03.26 - 95.03.29
  4.  
  5. ; This program takes an ascii text file and converts it to
  6. ; Kindwords3 format. Kindwords3 can load ascii files - but not
  7. ; very well. It links all lines of text in one large chunk,
  8. ; ignoring paragraphs and joining some words together. ASCIItoKW3
  9. ; hopefully improves on this. However, YOU USE THIS PROGRAM AT
  10. ; YOUR OWN RISK! It's a hack - and may not produce a perfectly
  11. ; correct file. I take no responsibility for any loss of data
  12. ; or anything else bad that may happen to anyone who uses this
  13. ; program.
  14.  
  15. ; Carl Read
  16. ; CyberCraft
  17. ; PO Box 4032
  18. ; Mayfair
  19. ; Hastings 4201
  20. ; NEW ZEALAND
  21.  
  22. .Initialize:
  23.   WBStartup
  24.  
  25.   ;This function when used with colours 1 or 2 produces the right
  26.   ;shading for windows and gadgets etc. regardless of what
  27.   ;Kickstart the program is running on. The exception is menu
  28.   ;colours and window colours. Using shade{} on them will screw
  29.   ;up the look of the menus.
  30.   Function Shade{sh}
  31.     If ExecVersion<36
  32.       If Int(sh+.49)=1
  33.         sh=2
  34.       Else
  35.         If Int(sh+.49)=2 Then sh=1
  36.       EndIf
  37.     EndIf
  38.     Function Return sh
  39.   End Function
  40.  
  41.   quitFlag=0
  42.   ev.l=0
  43.   ldPath$=""
  44.   ldFi$=""
  45.   paras=0
  46.   fiSize.l=0
  47.   long.l=0
  48.   Dim text$(32000)
  49.  
  50.   Screen 0,0,0,640,DispHeight,2,$8000,"ASCIItoKW3 v1.00.",Shade{2},Shade{1}
  51.   RGB 0,9,10,10:RGB Shade{1},0,0,0
  52.   RGB Shade{2},15,15,15:RGB 3,15,14,12
  53.  
  54. .Menu:
  55.   MenuColour 2
  56.   MenuTitle 0,0,"  Project  "
  57.   MenuItem 0,0,0,0,"Open","O"
  58.   MenuItem 0,0,0,1,"Save As     ","A"
  59.   MenuItem 0,0,0,2,"Help","H"
  60.   MenuItem 0,0,0,3,"About","?"
  61.   MenuItem 0,0,0,4,"Quit","Q"
  62.   MenuTitle 0,1,"  Options  "
  63.   MenuItem 0,3,1,0,"  Join Lines"
  64.   MenuItem 0,1,1,1,"  ASCII Output"
  65.   MenuState 0,0,1,Off
  66.  
  67. .Gads:
  68.   GadgetPens shade{1},0
  69.   Borders 2,1
  70.   BorderPens shade{2},shade{1}
  71.   TextGadget 0,132,-15,4,1," OK "
  72.   TextGadget 1,138,135,0,1," OK "
  73.   TextGadget 2,238,135,0,1," OK "
  74.  
  75. .Wind0:
  76.   Window 0,0,10,640,DispHeight-10,$0100|$800|$1000,"",2,1
  77.   SetMenu 0
  78.  
  79. .Start:
  80.   Gosub MainLoop
  81. End
  82.  
  83. .MainLoop:
  84.   Gosub AsciiOpen
  85.   While quitFlag=0
  86.     Gosub CheckEvents
  87.   Wend
  88. Return
  89.  
  90. .CheckEvents:
  91.   ev=WaitEvent
  92.   If ev<>0
  93.     winNo=EventWindow
  94.     If (ev AND $100)=$100 Then Gosub MenResponse
  95.     If (ev AND $200)=$200 Then Gosub CloseResponse
  96.     If (ev AND $40)=$40 Then Gosub GadResponse
  97.     If (ev AND $4)=$4 Then Gosub TidyWindow
  98.     If (ev AND $400)=$400 Then Gosub KeyResponse
  99.   EndIf
  100. Return
  101.  
  102. .ChEv:
  103.   ev=Event
  104.   If ev<>0
  105.     winNo=EventWindow
  106.     If (ev AND $100)=$100 Then Gosub MenResponse
  107.     If (ev AND $200)=$200 Then Gosub CloseResponse
  108.     If (ev AND $40)=$40 Then Gosub GadResponse
  109.     If (ev AND $4)=$4 Then Gosub TidyWindow
  110.     If (ev AND $400)=$400 Then Gosub KeyResponse
  111.   EndIf
  112. Return
  113.  
  114. .MenResponse:
  115.   men=MenuHit
  116.   it=ItemHit
  117.   Select men+1
  118.     Case 1
  119.       Select it+1
  120.         Case 1 ;Open
  121.           Gosub AsciiOpen
  122.         Case 2 ;Save As
  123.           If paras>0
  124.             Gosub KW3Save
  125.           EndIf
  126.         Case 3 ;Help
  127.           Gosub DoHelp
  128.         Case 4 ;About
  129.           SizeLimits 100,30,344,170
  130.           Window 2,142,12,344,170,15|$10|$20|$400|$1000,"About ASCIItoKW3.",2,1,1
  131.           SetMenu 0
  132.           Gosub AboutDraw
  133.         Case 5 ;Quit
  134.           quitFlag=1
  135.       End Select
  136.     Case 2
  137.       Select it+1
  138.         Case 1 ;Join Lines
  139.       End Select
  140.   End Select
  141. Return
  142.  
  143. .KeyResponse:
  144.   WindowInput winNo
  145.   If Inkey$=Chr$(139) Then Gosub DoHelp
  146. Return
  147.  
  148. .TidyWindow:
  149.   Select winNo
  150.     Case 1 ;
  151.     Case 2 ;
  152.       Gosub AboutDraw
  153.     Case 3 ;
  154.       Gosub HelpDraw
  155.   End Select
  156. Return
  157.  
  158. .AboutDraw:
  159.   Use Window 2
  160.   WLocate 0,2:WColour shade{2},0
  161.   NPrint String$(" ",12),"ASCIItoKW3 v1.00."
  162.   NPrint "":WColour shade{1}
  163.   NPrint String$(" ",14),"By Carl Read."
  164.   NPrint String$(" ",8),"Released 29th March 1995."
  165.   NPrint "":WColour shade{2}
  166.   NPrint " ASCIItoKW3 is  non-copyrighted  public"
  167.   NPrint " domain software. Spread it, modify it,"
  168.   NPrint " (it's written in Blitz Basic 2 and the"
  169.   NPrint " code is PD too),  and  generally  feel"
  170.   NPrint " free to do whatever you want with it."
  171.   NPrint "":WColour shade{1}
  172.   NPrint String$(" ",15),"Carl Read"
  173.   NPrint String$(" ",15),"CyberCraft"
  174.   NPrint String$(" ",10),"PO Box 4032 Mayfair"
  175.   NPrint String$(" ",13),"Hastings 4201"
  176.   NPrint String$(" ",14),"NEW ZEALAND"
  177. Return
  178.  
  179. .DoHelp:
  180.   SizeLimits 100,30,542,170
  181.   Window 3,49,24,542,170,15|$10|$20|$400|$1000,"ASCIItoKW3 Help.",2,1,2
  182.   SetMenu 0
  183.   Gosub HelpDraw
  184. Return
  185.  
  186. .HelpDraw:
  187.   Use Window 3
  188.   WLocate 0,2:WColour shade{2},0
  189.   NPrint "          ASCIItoKW3 v1.00.  By Carl Read - CyberCraft."
  190.   NPrint "":WColour shade{1},0
  191.   NPrint "     This program takes an ascii text file and  converts  it  to"
  192.   NPrint " Kindwords3 format. Kindwords3 can load ascii files  -  but  not"
  193.   NPrint " very well. It links all lines  of  text  in  one  large  chunk,"
  194.   NPrint " ignoring paragraphs and joining some words together. ASCIItoKW3"
  195.   NPrint " hopefully improves on this. However, YOU USE  THIS  PROGRAM  AT"
  196.   NPrint " YOUR OWN RISK! It's a hack - and may not  produce  a  perfectly"
  197.   NPrint " correct file. I take no responsibility for  anything  bad  that"
  198.   NPrint " that may happen to anyone  who  uses  this program."
  199.   NPrint "     With the menu option `Join Lines'  unselected,  no  attempt"
  200.   NPrint " will be made to join lines into paragraphs. With `ASCII Output'"
  201.   NPrint " selected, files are saved in ascii format and not KW3 format."
  202.   NPrint "     Future: Better docs for a  start!  Also,  better  paragraph"
  203.   NPrint " creation is needed."
  204.   NPrint "     See `About' in the menus if you wish to get in touch."
  205. Return
  206.  
  207. .AsciiOpen:
  208.   prompt$="Load ASCII file."
  209.   path$=ldPath$:fi$=ldFi$:noFiCheck=0:Gosub FiRequest
  210.   If ldError=0
  211.     ldPath$=path$:ldFi$=fi$
  212.     Gosub AsciiLoad
  213.   Else
  214.     Gosub SelMen
  215.   EndIf
  216. Return
  217.  
  218. .AsciiLoad:
  219.   a$=ldFi$
  220.   If ldPath$<>""
  221.     If Right$(ldPath$,1)<>":" Then a$="/"+a$
  222.   EndIf
  223.   a$=ldPath$+a$
  224.   errFlag=0:pError=0
  225.   SetErr
  226.     errFlag=1
  227.   End SetErr
  228.   fiSize=Exists(a$)
  229.   If errFlag=0 AND fiSize>0
  230.     If ReadFile(0,a$)
  231.       ;Clear out previous strings.
  232.       For n=0 To paras:text$(n)="":Next
  233.       ;Load file.
  234.       paras=0:po=0:c$="":WColour shade{2},0
  235.       Flag10=0:Flag13=0
  236.       For long=1 To fiSize
  237.         Gosub ChEv
  238.         FileInput 0
  239.         b$=Inkey$
  240.         If b$=Chr$(10) OR b$=Chr$(13)
  241.           If b$=Chr$(10) AND Flag13=1 Then Flag13=2
  242.           If b$=Chr$(13) AND Flag10=1 Then Flag13=2
  243.           If Flag13<>2
  244.             If b$=Chr$(10)Then Flag10=1
  245.             If b$=Chr$(13)Then Flag13=1
  246.             text$(paras)=c$:po$=c$:Gosub PrOut
  247.             c$="":paras+1
  248.             If paras=32000
  249.               long=fiSize:pError=1
  250.               errMes1$="Too many lines of text!"
  251.               errMes2$="No more than 32000 allowed."
  252.               Gosub ErrMessage
  253.               Gosub SelMen
  254.             EndIf
  255.           EndIf
  256.           If Flag13=2 Then Flag13=0:Flag10=0
  257.         Else
  258.           c$+b$
  259.         EndIf
  260.       Next
  261.       If c$<>"" AND pError=0
  262.         text$(paras)=c$:paras+1:po$=c$:Gosub PrOut
  263.       EndIf
  264.       ;Remove leading spaces if all lines have some.
  265.       Use Window 0:paraJoin=MenuChecked(0,1,0)
  266.       If paraJoin=-1 AND pError=0
  267.         WColour shade{1},0
  268.         a=-1
  269.         For n=0 To paras-1
  270.           Gosub ChEv
  271.           ;text$(n)=Replace$(text$(n),Chr$(13),"")
  272.           po$=text$(n):Gosub PrOut
  273.           If text$(n)<>""
  274.             If Left$(text$(n),1)=" " AND (a=-1 OR a>1)
  275.               For m=1 To Len(text$(n))
  276.                 If Mid$(text$(n),m,1)<>" "
  277.                   b=m-1:m=Len(text$(n))
  278.                 EndIf
  279.               Next
  280.               If a=-1
  281.                 a=b
  282.               Else
  283.                 If b<a Then a=b
  284.               EndIf
  285.             Else
  286.               a=0
  287.             EndIf
  288.           EndIf
  289.         Next
  290.         WColour 3,0
  291.         If a>0
  292.           For n=0 To paras-1
  293.             Gosub ChEv
  294.             text$(n)=UnRight$(text$(n),a):po$=text$(n):Gosub PrOut
  295.           Next
  296.         EndIf
  297.       EndIf
  298.       ;Process text.
  299.       WColour shade{2},0
  300.       If paras>1 AND paraJoin=-1 AND pError=0
  301.         a=0:b=0:Use Window 0
  302.         While a<paras
  303.           Gosub ChEv
  304.           If text$(a)=""
  305.             text$(b)="":a+1:b+1:po$="":Gosub PrOut
  306.           Else
  307.             text$(b)=text$(a):a+1
  308.             If a<paras
  309.               c=0
  310.               While c=0
  311.                 Gosub ChEv
  312.                 If text$(a)="" OR Left$(text$(a),1)=" "
  313.                   c=1:po$=text$(b):Gosub PrOut:b+1
  314.                 Else
  315.                   If Right$(text$(b),1)<>" "
  316.                     text$(b)+" "
  317.                   EndIf
  318.                   text$(b)+text$(a):a+1
  319.                   If a=paras
  320.                     c=1:po$=text$(b):Gosub PrOut:b+1
  321.                   EndIf
  322.                 EndIf
  323.               Wend
  324.             Else
  325.               po$=text$(b):Gosub PrOut:b+1
  326.             EndIf
  327.           EndIf
  328.         Wend
  329.         If b<paras
  330.           For n=b To paras-1:text$(n)="":Next:paras=b
  331.         EndIf
  332.       EndIf
  333.       ;Compute file size.
  334.       WColour shade{1},0
  335.       If pError=0
  336.         fiSize=paras*8+558
  337.         For n=0 To paras-1
  338.           Gosub ChEv
  339.           po$=text$(n):Gosub PrOut
  340.           fiSize+Len(text$(n))+(Len(text$(n))AND 1)
  341.         Next
  342.         svFi$=ldFi$
  343.         If Len(svFi$)>4
  344.           If Right$(svFi$,4)=".asc"
  345.             svFi$=UnLeft$(svFi$,4)
  346.           Else
  347.             svFi$=Left$(svFi$,21)
  348.           EndIf
  349.         EndIf
  350.         svFi$+".KW3"
  351.         If svPath$="" Then svPath$=ldPath$
  352.         MenuState 0,0,1,On
  353.         Gosub KW3Save
  354.       EndIf
  355.     Else
  356.       Gosub LdingProblems
  357.     EndIf
  358.     CloseFile 0
  359.   Else
  360.     Gosub LdingProblems
  361.   EndIf
  362.   ClrErr
  363.   Use Window 0
  364. Return
  365.  
  366. .LdingProblems:
  367.   errMes1$="Problems loading file!"
  368.   errMes2$="Processing canceled."
  369.   Gosub ErrMessage
  370.   Gosub SelMen
  371. Return
  372.  
  373. .SvingProblems:
  374.   errMes1$="Problems saving file!"
  375.   errMes2$="Saving canceled."
  376.   Gosub ErrMessage
  377. Return
  378.  
  379. .PrOut:
  380.   Use Window 0
  381.   WLocate 0,po*8+2
  382.   NPrint Left$(po$+String$(" ",79),79)
  383.   NPrint String$(" ",79)
  384.   po$="":po+1:If po=20 Then po=0
  385. Return
  386.  
  387. .KW3Save:
  388.   prompt$="Saving as a KW3 file."
  389.   asciiFlag=MenuChecked(0,1,1)
  390.   path$=svPath$:fi$=svFi$
  391.   If asciiFlag=-1 Then fi$=".asc":prompt$="Saving as an ASCII file."
  392.   noFiCheck=1:Gosub FiRequest
  393.   If ldError=0
  394.     svPath$=path$:svFi$=fi$
  395.     Gosub KSave
  396.   EndIf
  397.   Gosub SelMen
  398. Return
  399.  
  400. .SelMen:
  401.   Use Window 0:WColour shade{2},0
  402.   po$=String$(" ",29)+"Select a menu option.":Gosub PrOut
  403. Return
  404.  
  405. .KSave:
  406.   a$=svFi$
  407.   If svPath$<>""
  408.     If Right$(svPath$,1)<>":" Then a$="/"+a$
  409.   EndIf
  410.   a$=svPath$+a$
  411.   If paras>0
  412.     errFlag=0
  413.     SetErr
  414.       errFlag=1
  415.     End SetErr
  416.     If errFlag=0
  417.       If WriteFile(0,a$)
  418.         FileOutput 0
  419.         If asciiFlag=0
  420.           Restore KW3Dta
  421.           For n=1 To 4:Read a:Print Chr$(a):Next
  422.           Print Mkl$(fiSize)
  423.           For n=1 To 426:Read a:Print Chr$(a):Next
  424.           For n=0 To paras-1
  425.             Print Chr$(87)+Chr$(84)+Chr$(88)+Chr$(84)
  426.             long=Len(text$(n)):Print Mkl$(long)
  427.             Print text$(n)
  428.             If (Len(text$(n))AND 1)=1 Then Print Chr$(0)
  429.           Next
  430.           For n=1 To 132:Read a:Print Chr$(a):Next
  431.         Else
  432.           For n=0 To paras-1
  433.             NPrint text$(n)
  434.           Next
  435.         EndIf
  436.       Else
  437.         Gosub SvingProblems
  438.       EndIf
  439.       CloseFile 0
  440.     Else
  441.       Gosub SvingProblems
  442.     EndIf
  443.     ClrErr
  444.   Else
  445.     errMes1$="Nothing to save!"
  446.     errMes2$=""
  447.     Gosub ErrMessage
  448.   EndIf
  449.   Use Window 0:WColour shade{2},0
  450. Return
  451.  
  452. .CloseResponse:
  453.   Select winNo
  454.     Case 1
  455.     Case 2
  456.       Free Window 2
  457.     Case 3
  458.       Free Window 3
  459.   End Select
  460. Return
  461.  
  462. .GadResponse:
  463.   gad=GadgetHit
  464.   Select winNo
  465.      Case 1
  466.      Case 2
  467.        Free Window 2
  468.      Case 3
  469.        Free Window 3
  470.   End Select
  471. Return
  472.  
  473. .FiRequest:
  474.   Use Screen 0: ShowScreen 0
  475.   MaxLen a$=250:MaxLen b$=192
  476.   a$=path$:b$=fi$:If a$+b$="" Then a$="RAM:"
  477.   ldError=0
  478.   SetErr
  479.     ldError=1
  480.   End SetErr
  481.   If ldError=1 Then ClrErr:Return
  482.   If ExecVersion<36
  483.     pathFi$=FileRequest$(prompt$,a$,b$)
  484.   Else
  485.     pathFi$=ASLFileRequest$(prompt$,a$,b$,"",164,13,312,DispHeight-16)
  486.   EndIf
  487.   If pathFi$="" Then ldError=1:ClrErr:Return
  488.   If Exists(pathFi$)=0 AND noFiCheck=0
  489.     errMes1$="That file doesn't exist"
  490.     errMes2$="or is empty."
  491.     Gosub ErrMessage
  492.     ldError=1
  493.   Else
  494.     ldError=0:a$=pathFi$:Gosub StripFile
  495.     If b$+c$=""
  496.       path$="":fi$=a$
  497.     Else
  498.       path$=b$:fi$=c$
  499.     EndIf
  500.   EndIf
  501.   ClrErr
  502. Return
  503.  
  504. StripFile:
  505.   b$="":c$=""
  506.   For n=Len(a$) To 1 Step-1
  507.     If Mid$(a$,n,1)="/"
  508.       b$=Left$(a$,n-1):c$=Mid$(a$,n+1):n=1
  509.     Else
  510.       If Mid$(a$,n,1)=":"
  511.         b$=Left$(a$,n):c$=Mid$(a$,n+1):n=1
  512.       EndIf
  513.     EndIf
  514.   Next
  515. Return
  516.  
  517. .ErrMessage:
  518.   Window 1,20,24,312,70,14|$10|$20|$400|$1000,"Error Message.",2,1,0
  519.   SetMenu 0:WColour 3,0
  520.   NPrint""
  521.   NPrint Left$(String$(" ",18),18-Len(errMes1$)/2)+errMes1$
  522.   NPrint""
  523.   NPrint Left$(String$(" ",18),18-Len(errMes2$)/2)+errMes2$
  524.   FlushEvents
  525.   aa=0
  526.   While aa=0
  527.     ev=Event
  528.     If ev>0
  529.       If EventWindow=1
  530.         gad=GadgetHit
  531.         If (ev AND $20)=$20 AND gad=1 Then aa=1
  532.         If (ev AND $200)=$200 Then aa=1
  533.       EndIf
  534.     EndIf
  535.   Wend
  536.   Free Window 1:FlushEvents:ev=0
  537. Return
  538.  
  539. .KW3Dta:
  540.   ;First block of data.
  541.   Data 70,79,82,77
  542.   ;Four byte total file length (minus 8) inserted here.
  543.   ;Second block of data.
  544.   Data 87,79
  545.   Data 87,79,87,86,82,78,0,0,0,8
  546.   Data 0,0,0,1,0,0,0,0,87,70
  547.   Data 78,84,0,0,0,10,1,0,0,8
  548.   Data 116,111,112,97,122,0,87,73,78,70
  549.   Data 0,0,0,184,0,0,0,0,0,0
  550.   Data 0,0,0,0,0,0,0,0,0,0
  551.   Data 0,0,0,0,0,0,0,0,0,0
  552.   Data 0,0,0,0,0,0,0,0,0,0
  553.   Data 0,0,0,0,0,0,0,0,0,0
  554.   Data 0,0,0,0,0,0,0,0,0,0
  555.   Data 0,0,0,0,0,0,0,0,0,0
  556.   Data 0,0,0,0,0,0,0,0,0,0
  557.   Data 0,0,0,0,0,0,0,0,0,0
  558.   Data 0,0,0,0,0,0,0,0,0,0
  559.   Data 0,0,0,0,0,0,0,0,0,0
  560.   Data 0,0,0,0,0,0,0,0,0,0
  561.   Data 0,0,0,0,47,117,147,236,0,0
  562.   Data 0,0,0,0,0,0,0,0,0,0
  563.   Data 0,0,0,0,0,0,0,0,0,0
  564.   Data 0,0,0,0,0,0,0,0,0,0
  565.   Data 0,0,0,0,0,0,0,0,0,0
  566.   Data 0,1,0,0,0,0,0,0,0,193
  567.   Data 0,0,0,0,0,0,0,0,87,68
  568.   Data 79,67,0,0,0,54,0,1,0,13
  569.   Data 0,12,21,192,0,12,21,192,0,0
  570.   Data 84,96,0,0,0,0,0,0,140,160
  571.   Data 0,0,56,64,0,0,56,64,0,0
  572.   Data 0,0,1,0,0,0,0,0,2,0
  573.   Data 0,1,0,0,0,46,0,0,0,0
  574.   Data 87,83,77,68,0,0,0,54,0,2
  575.   Data 0,0,10,170,0,0,15,255,5,156
  576.   Data 15,0,12,151,0,13,15,112,0,207
  577.   Data 15,15,15,208,1,196,9,142,7,102
  578.   Data 6,8,13,203,0,60,0,72,1,1
  579.   Data 1,0,1,0,0,0,0,0,0,0
  580.   Data 0,0,87,80,70,48,0,0,0,20
  581.   Data 0,15,0,0,0,0,0,0,0,0
  582.   Data 0,0,0,0,0,0,0,0,0,0
  583.   Data 87,80,65,82,0,0,0,28,0,0
  584.   Data 84,96,0,0,84,96,0,0,0,0
  585.   Data 0,0,140,160,0,2,0,0,0,1
  586.   Data 0,0,1,2,0,124,87,84,65,66
  587.   Data 0,0,0,0
  588.   ;Paragraphs are to be inserted here.
  589.   ;  Each paragraph consists of four bytes (87,84,88,84) followed
  590.   ;  by four bytes giving the paragraph length and then the
  591.   ;  paragraph itself. If the paragraph length is an uneven
  592.   ;  number then a zero byte is added also.
  593.   ;Last block of data.
  594.   Data 87,72,69,68,0,0,0,6
  595.   Data 3,1,0,0,0,0,87,80,65,82
  596.   Data 0,0,0,28,0,0,84,96,0,0
  597.   Data 84,96,0,0,0,0,0,0,140,160
  598.   Data 0,2,0,0,0,1,0,0,1,2
  599.   Data 0,124,87,84,65,66,0,0,0,0
  600.   Data 87,84,88,84,0,0,0,0,87,70
  601.   Data 79,84,0,0,0,6,3,1,0,0
  602.   Data 0,0,87,80,65,82,0,0,0,28
  603.   Data 0,0,84,96,0,0,84,96,0,0
  604.   Data 0,0,0,0,140,160,0,2,0,0
  605.   Data 0,1,0,0,1,2,0,124,87,84
  606.   Data 65,66,0,0,0,0,87,84,88,84
  607.   Data 0,0,0,0
  608.  
  609.  
  610.  
  611.